from typing import Union

from PyQt5.QtCore import QObject, pyqtSignal


# 定义一个QObject派生类,作为信号的发射者
class SignalEmitter(QObject):
    # 定义一个自定义信号
    customSignal = pyqtSignal(str)

    def emit_signal(self, data):
        # 发射自定义信号
        self.customSignal.emit(data)
